package com.gxa.mall.model;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;
/**
 * 员工类
 */
@Component
public class Employee {
    private Integer id;
    private String name;
    private String sex;
    private Integer age;
    private String phonenum;
    private String address;
    private Integer state;
    //管理员添加员工的时间
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date addtime;

    public Employee() {
    }

    public Employee(Integer id, String name, String sex, Integer age, String phonenum, String address, Integer state, Date addtime) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.phonenum = phonenum;
        this.address = address;
        this.state = state;
        this.addtime = addtime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getPhonenum() {
        return phonenum;
    }

    public void setPhonenum(String phonenum) {
        this.phonenum = phonenum;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getAddtime() {
        return addtime;
    }

    public void setAddtime(Date addtime) {
        this.addtime = addtime;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", phonenum='" + phonenum + '\'' +
                ", address='" + address + '\'' +
                ", state=" + state +
                ", addtime=" + addtime +
                '}';
    }

}
